<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>javascript study</title>
    </head>
    <body>
        <p>json Google:<span id="out"></span></p>
        <script >
        var text = '{ "sites" : [' +
        '{ "name":"Runoob" , "url":"www.runoob.com" },' +
        '{ "name":"Google" , "url":"www.google.com" },' +
        '{ "name":"Taobao" , "url":"www.taobao.com" } ]}';
        var obj = JSON.parse(text);
        document.getElementById("out").innerHTML= obj.sites[1].name;
        </script>
    </body>
</html>